<template>
    <navbar @myclick="handleChange"></navbar>
    <sidebar v-if="state.isShow"></sidebar>
</template>

<script>
import { reactive } from 'vue'
import Navbar from './components/NavBar'
import Sidebar from './components/SideBar'

export default {
  components: {
    Navbar, Sidebar
  },
  setup () {
    const state = reactive({
      isShow: false
    })
    const handleChange = () => {
      state.isShow = !state.isShow
    }
    return {
      state,
      handleChange
    }
  }
}
</script>
